package com.shopping.auth.feign;

import com.shopping.auth.vo.SocialUserVo;
import com.shopping.auth.vo.UserLoginVo;
import com.shopping.auth.vo.UserRegisterVo;
import com.shopping.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Europa
 */
@FeignClient("member")
public interface MemberFeignService {

    /**
     * 用户注册功能
     *
     * @param registerVo UserRegisterVo
     * @return
     */
    @RequestMapping("/member/member/register")
    R register(@RequestBody UserRegisterVo registerVo);

    /**
     * 用户登录功能
     *
     * @param loginVo
     * @return
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo loginVo);

    /**
     * 社交登陆
     *
     * @param userVo SocialUserVo
     * @return
     */
    @PostMapping("/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUserVo userVo);

}
